package plp.orientadaObjetos2.cabecalho;

import plp.orientadaObjetos2.memoria.AmbienteCompilacaoOO2;

public class RightExpression {

	private String id;
	private RightExpression rightExpression;
	
	public RightExpression(String id) {
		this.id = id;
	}
	
	public RightExpression(String id, RightExpression rightExpression){
		this(id);
		this.rightExpression = rightExpression;
	}
	
	public String getValor(){
		if(this.rightExpression == null){
			return this.id;
		}
		else{
			return this.id+ "." + this.rightExpression.getValor();
		}
	}

	public boolean checarTipo(AmbienteCompilacaoOO2 ambiente){
		return true;
	}

}
